﻿@model PInitiatives.ViewModels.VMReviews.VMInitativeReview
@{
    ViewBag.Title = "Ocena iventu";
}

@if (Model.InitiativeRate == 0)
{
    <h3>Oceń ivent</h3>
}
else
{ 
    <div class="alert alert-success">
        Ivent został już oceniony.
    </div>
}

<br/>
<div style="border-bottom: 1px solid #DDD;"></div>
<br/>
<p>
    <div class="display-field"><b>Ivent</b>: @Html.DisplayFor(model => model.Initative.Name)</div>
</p>
<p>
    <div class="display-field"><b>Autor iventu</b>: @Html.DisplayFor(model => model.Initative.InitiativeAuthor.FirstName)
                            @Html.DisplayFor(model => model.Initative.InitiativeAuthor.LastName)</div>
</p>
<br/>
<div style="border-bottom: 1px solid #DDD;"></div>





</br>
@*Inicjatywa: @Model.Initative.Name </br>
Autor: @Model.Initative.InitiativeAuthor.FirstName @Model.Initative.InitiativeAuthor.FirstName*@

@if (!ViewBag.HasRate)
{
    using (Html.BeginForm())
    {
        @Html.ValidationSummary(true)
        <fieldset>
            <div class="editor-label">
                @Html.LabelFor(model => model.AuthorRate)
            </div>
            <div class="editor-field">
                1
                @Html.RadioButtonFor(model => model.AuthorRate, 1) &nbsp;&nbsp;
                2
                @Html.RadioButtonFor(model => model.AuthorRate, 2) &nbsp;&nbsp;
                3
                @Html.RadioButtonFor(model => model.AuthorRate, 3) &nbsp;&nbsp;
                4
                @Html.RadioButtonFor(model => model.AuthorRate, 4) &nbsp;&nbsp;
                5
                @Html.RadioButtonFor(model => model.AuthorRate, 5) &nbsp;&nbsp;
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.InitiativeRate)
            </div>
            <div class="editor-field">
                1
                @Html.RadioButtonFor(model => model.InitiativeRate, 1) &nbsp;&nbsp;
                2
                @Html.RadioButtonFor(model => model.InitiativeRate, 2) &nbsp;&nbsp;
                3
                @Html.RadioButtonFor(model => model.InitiativeRate, 3) &nbsp;&nbsp;
                4
                @Html.RadioButtonFor(model => model.InitiativeRate, 4) &nbsp;&nbsp;
                5
                @Html.RadioButtonFor(model => model.InitiativeRate, 5) &nbsp;&nbsp;
                @Html.ValidationMessageFor(model => model.InitiativeRate)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Description)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Description)
            </div>
            <br/>
            <div style="border-bottom: 1px solid #DDD;"></div>
            <br/>
            <button type="submit" class="btn ini-green-btn" ><i class="icon-check icon-white"></i> Oceń</button>
        </fieldset>
    }
}
else
{ 
    <div class="display-field"><b>@Html.LabelFor(m => m.AuthorRate)</b> @Html.DisplayFor(m => m.AuthorRate)</div>
    <div class="display-field"><b>@Html.LabelFor(m => m.InitiativeRate)</b> @Html.DisplayFor(m => m.InitiativeRate)</div>

    <div class="display-label"><b>@Html.LabelFor(m => m.Description)</b></div>
    <div class="display-field">@Html.DisplayFor(m => m.Description)</div>
}


